# 启动mysql
docker run -d \
--name mysql \
-p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=123456  \
-e TZ=Asia/Shanghai \
-v /root/mysql/data:/var/lib/mysql \
-v /root/mysql/conf:/etc/mysql/conf.d \
--network sdpnet \
--privileged=true \
--restart=always \
mysql:latest

# 启动redis
docker run -d \
--name redis \
--privileged=true \
--restart=always \
-p 6379:6379 \
-v /root/redis/data:/data \
-v /roo/redis/conf/redis.conf:/etc/redis/redis.conf \
--network sdpnet \
redis:latest \
redis-server /etc/redis/redis.conf

# 启动项目
cd /root/self-developed-platform
git pull
cd sdp-back
mvn clean package -Dmaven.test.skip=true
docker stop sdp-back
docker rm sdp-back
docker rmi sdp-back
docker build -t sdp-back .
docker run -d --name sdp-back -p 8090:8090 --network sdpnet --restart=always sdp-back